public class Main {
    public static void main(String[] args) {
        // 假设我们在 Windows 系统上运行
        GUIFactory factory = new WindowsFactory();
        Application app = new Application(factory);
        System.out.println("Running on Windows:");
        app.render();

        System.out.println("\nSwitching to Mac...\n");

        // 假设我们在 Mac 系统上运行
        factory = new MacFactory();
        app = new Application(factory);
        System.out.println("Running on Mac:");
        app.render();
    }
}
